package com.demo.designpattern.factory;

/**
 * Created by hunter
 *
 * @Description 茶 简单工厂
 */
public class SimpleTeaFactory {

    public Tea getTea(TeaEnum teaEnum) {
        switch (teaEnum) {
            case TEA_BLACK:
                return new BlackTea();
            case TEA_GREEN:
                return new GreenTea();
            default:
                return null;
        }
    }
}
